import request from '@/utils/request'

// 查询工厂建模列表
export function listFactory(query) {
  return request({
    url: '/factory/factory/list',
    method: 'get',
    params: query
  })
}

// 查询工厂建模详细
export function getFactory(id) {
  return request({
    url: '/factory/factory/' + id,
    method: 'get'
  })
}

// 新增工厂建模
export function addFactory(data) {
  return request({
    url: '/factory/factory',
    method: 'post',
    data: data
  })
}

// 修改工厂建模
export function updateFactory(data) {
  return request({
    url: '/factory/factory',
    method: 'put',
    data: data
  })
}

// 删除工厂建模
export function delFactory(id) {
  return request({
    url: '/factory/factory/' + id,
    method: 'delete'
  })
}
// 查询工厂建模树
export function ListTreeData() {
  return request({
    url: '/factory/factory/listTreeData',
    method: 'get'
  })
}
// 查询工厂建模列表
export function getFactoryList(id) {
  return request({
    url: '/factory/factory/getFactoryList/'+id,
    method: 'get',
  })
}
